package com.example.bigwork;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity0 extends AppCompatActivity {

    private TextView register;
    private Button btnlogin;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity0_main);


        //获取注册控件
        register = findViewById(R.id.register);
        btnlogin = findViewById(R.id.login);

        //register绑定点击事件  跳转到注册界面
        register.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(
                        MainActivity0.this,
                        RegisterActivity.class
                );
                startActivity(intent);


            }
        });

        btnlogin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(
                        MainActivity0.this,
                        MainActivity.class
                );
                startActivity(intent);
            }
        });


    }
}